Freelancer QuickMod XML Tutorial
Author: Yin
Contact: http://sssinc.no-ip.org
Email to: shadowsoulconcepts@gmail.com

Tools needed for XML scripting:
Windows Notepad/Wordpad
XML Scripter 2 (get from LancersReactor, optional)
An empty XML script (you can download the full spare .dll, .ini and .xml from my website)

XML is widely used for mods as it is useful for displaying mod information, easy to add files/change files around with
and most importantly is used by the universal freelancer modding program called Freelancer Mod Manager.
The XML script-make sure it is named: script 
is combined with whatever files you are going to use for your mod and using WinRar or a similar compression/decompression
select "Add to archive" and make sure that the file extension is .zip.flmod (so that FLMM picks it up and zips it for you)

<script> =is necessary to start your script
<header name = "(your mod name here)"
<scriptversion> =necessary, shows your mod/script version
</scriptversion> =necessary, brackets the end of your mod/script version
<author> =necessary, your name here
</author> =end of your name
<modurl> =necessary, shows your contact website for your mod-can be left empty
</modurl> =end of your modurl
<description> =your brief description of your mod  here
</description> =ends your description
</header> =ends your header (when you are ready to start your data)
</script> (end of script)


Types of ways to change/modify files
1. Appending (adding onto a file)
How to:
Add this after the end of your mod header but anywhere before the end of your script:
<data file="DATA\(folder that you wish to append to for your .ini file)\(file.ini =file that you are appending to)>
<source>
the start of your new files to copy to e.g
[name of entry]

then following with the data that you wish to add.

</source>
</data>

2. Section Appending (adding onto a particular section of a file)
How to:
Add this after the end of your mod header but anywhere before the end of your script:

<data file="data\equipment\market_misc.ini" method="sectionappend" numTimes="0">
<section>
the section you want to add onto e.g [SectionName]
</section>
<source>
the data that you want to add onto the section
</source>
</data>

3. Section Replacing (replacing a particular section of a file with another)
Add this after the end of your mod header but anywhere before the end of your script:
<data file="data\folder\filetobechanged.ini" method="sectionreplace">
<section>
the section that you want to replace an entry in e.g [SectionName]
</section>
<dest>
then precise entry you want to replace e.g. entry= entry to replace
</dest>
<source>
the precise entry that you want to replace the entry with
</source>
</data>

4. Rename file
Add this after the end of your mod header but anywhere before the end of your script:
<data file="DATA\name of file to change name to" method="renamefile" newfilename="DATA\file that you want to rename to">
</data>

5. Section Delete (delete sections that you dont want)
How to:
Add this after the end of your mod header but anywhere before the end of your script:
<data file="data\dir\file.ext" method="sectiondelete">
<section>
precise entry that you want to delete
</section>
</data>

6. File Copy
How to:
Add this after the end of your mod header but anywhere before the end of your script:
<data file="data\directory\file.ext" method="copyfile" sourcefile="data\directory\file.ext" scanfile="False">
</data>


7. XML IDS Generation
Add this after the end of your mod header but anywhere before the end of your script and use for
new equipment/ships/commodities:
ids_name = 0 ;GENERATESTRRES("name of new thing")
ids_info = 0 ;GENERATESTRRES("Description of the thing")
-----------------------------------------------------------
To properly control the scripting of the XML (e.g add fonts, paragraphing etc.) add this to the end of: ids_info =0 ;
GENERATEXMLRES("<?xml version="1.0" encoding="UTF-16"?><RDL><PUSH/><TRA data="1" mask="1" def="-2"/><JUST loc="center"/><TEXT>Name of your equipment</TEXT><PARA/><TEXT> 
</TEXT><PARA/><TRA data="0" mask="1" def="-1"/><JUST loc="left"/><TEXT>The text of your equpment</TEXT><PARA/><POP/></RDL>") 
-----------------------------------------------------------
Note that the <JUST loc="left"/> can be changed to right or center for alignment of your text.
To add paragraphs, simply write <PARA> for a new paragraph and </PARA> for the end of it.